package com.net.oil.order.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.order.bean.ReserveBeanV2;
import com.net.oil.order.contract.ReserveContract;
import com.net.oil.order.model.ReserveModel;

/**
 * 作者：lch
 * 时间：2018/4/25 0025:下午 21:55
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class ReservePresenter extends BasePresenter<ReserveContract.View> implements ReserveContract.Presenter {

    private ReserveContract.View view;
    private ReserveContract.Model model;

    public ReservePresenter(ReserveContract.View view) {
        this.view = view;
        model = new ReserveModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getReserveList(int page, int rows) {
        model.getReserveList(page, rows);
    }

    @Override
    public void getReserveListSuccess(ReserveBeanV2 reserveBeans) {
        view.getReserveListSuccess(reserveBeans);
    }

    @Override
    public void getReserveListFailed() {
        view.getReserveListFailed();
    }
}
